package org.hamster.multidropbox.dropbox.service
{
	import org.hamster.common.services.SimpleCacheService;
	import org.hamster.multidropbox.dropbox.vo.AppDropboxFile;
	import org.hamster.multidropbox.main.vo.IStorableVO;
	
	public class DropboxTreeCacheService extends SimpleCacheService implements IStorableVO
	{
		public static const SPLIT:String = ":";
		
		private static var _instance:DropboxTreeCacheService;
		
		public static function get instance():DropboxTreeCacheService
		{
			if (!_instance) {
				_instance = new DropboxTreeCacheService();
			}
			return _instance;
		}
		
		public function DropboxTreeCacheService()
		{
			super();
		}
		
		public function putDropboxItem(clientUID:int, dropboxFile:AppDropboxFile):void
		{
			var key:String = clientUID.toString() + SPLIT + dropboxFile.path;
			this.putItem(key, dropboxFile);
		}
		
		public function getDropboxItem(clientUID:int, path:String):AppDropboxFile
		{
			var key:String = clientUID.toString() + SPLIT + path;
			return getItem(key);
		}
		
		public function encodeXML():XML
		{
			return null;
		}
		
		public function decodeXML(value:XML):void
		{
			
		}
	}
}